import Vue from 'vue'

export default {
  categoryService:function (config,callback){
    Vue.axios.post(Vue.prototype.$g.foodkind,config).then(r=>{
      callback(r.data);
    });
  },
  searchFoodService:function (config,callback){
    Vue.axios.post(Vue.prototype.$g.selectfood,config).then(r=>{
      callback(r.data);
    });
  },
  delFoodService:function (config,callback){
    Vue.axios.post(Vue.prototype.$g.delfood,config).then(r=>{
      callback(r.data);
    });
  },
  uploadService:function (config,callback){
    Vue.axios.post(Vue.prototype.$g.upload,config,{
      headers:{
        'Content-Type': 'multipart/form-data',
      }
    }).then(r=>{
      callback(r.data);
    });
  },
  addFoodService:function (config,callback){
    Vue.axios.post(Vue.prototype.$g.addfood,config).then(r=>{
      callback(r.data);
    });
  },
  editFoodService:function (config,callback){
    Vue.axios.post(Vue.prototype.$g.editfood,config).then(r=>{
      callback(r.data);
    });
  },



}